<meta charset="UTF-8">
<!--<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/p2p-dplayer@latest/dist/DPlayer.min.css">-->
<style type="text/css">
    body,html{width:100%;height:100%;background:#000;padding:0;margin:0;overflow-x:hidden;overflow-y:hidden}
    *{margin:0;border:0;padding:0;text-decoration:none}
    #stats{position:fixed;top:5px;left:10px;font-size:12px;color:#fdfdfd;z-index:2147483647;text-shadow:1px 1px 1px #000, 1px 1px 1px #000}
    #dplayer{position:inherit}
</style>
<div id="dplayer"></div>
<div id="stats"></div>
<!--<script src="./dist/hls.min.js"></script>-->
<script src="//cdn.jsdelivr.net/npm/cdnbye@latest"></script>
<script src="https://cdn.jsdelivr.net/npm/dplayer@latest"></script>
<script src="//cdn.jsdelivr.net/npm/vconsole@latest"></script>
<script>
    var _peerId = '', _peerNum = 0, _totalP2PDownloaded = 0, _totalP2PUploaded = 0;
    const dp = new DPlayer({
        container: document.getElementById('dplayer'),
        autoplay: true,
        video: {
            url: 'http://cn.123fanyi.cc:88/%E8%BF%9E%E8%BD%BD/%E7%B2%A4%E8%AF%AD%E5%8A%A8%E7%94%BB/%E7%81%AB%E4%B9%8B%E4%B8%B8%E7%9B%B8%E6%89%9101%EF%BC%88KTKKT.COM%EF%BD%9C%E5%9B%BD%E8%AF%AD%E5%8A%A8%E7%94%BB%EF%BC%89/index.m3u8',
            type: 'customHls',
            customType: {
                'customHls': function (video, player) {
                    const hls = new Hls({
                        debug: false,
                        // Other hlsjsConfig options provided by hls.js
                        p2pConfig: {
                            logLevel: 'debug',
                            live: false,        // 如果是直播设为true
                            // Other p2pConfig options provided by CDNBye
                        }
                    });
                    hls.loadSource(video.src);
                    hls.attachMedia(video);
                }
            }
        }
    });

    var vConsole = new VConsole();
</script>